import java.io.IOException;

import org.eclipse.core.internal.resources.File;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.emf.codegen.ecore.genmodel.GenModel;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceImpl;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;


public class Test {

	/*public static void main(String[] args) {
		try {
			
		} catch(IOException ex) {
			ex.printStackTrace();
		}
	}
	
	public void generateDiagram() {
		ResourceSet resourceSet = new ResourceSetImpl();

		Resource genmodel = new ResourceImpl();
		genmodel =
		resourceSet.createResource(URI.createPlatformResourceURI("/bt.com.ccm.generation.plugin/model/product.genmodel ",
		true));
		System.out.println("print genmodel: "+genmodel.toString());

		Resource gmfgraph = new ResourceImpl();
		gmfgraph =
		resourceSet.createResource(URI.createPlatformResourceURI("/bt.com.ccm.generation.plugin/model/product.gmfgraph ",
		true));
		System.out.println("print gmfgraph: "+gmfgraph.toString());

		Resource gmftool = new ResourceImpl();
		gmftool =
		resourceSet.createResource(URI.createPlatformResourceURI("/bt.com.ccm.generation.plugin/model/product.gmftool ",
		true));
		System.out.println("print gmftool: "+gmftool.toString());

		Resource gmfmap = new ResourceImpl();
		gmfmap =
		resourceSet.createResource(URI.createPlatformResourceURI("/bt.com.ccm.generation.plugin/model/product.gmfmap ",
		true));
		System.out.println("print gmfmap: "+gmfmap.toString());

		resourceSet.getResources().add(genmodel);
		resourceSet.getResources().add(gmfgraph);
		resourceSet.getResources().add(gmftool);
		resourceSet.getResources().add(gmfmap);

		TransformToGenModelOperation tgmfgen
				= new TransformToGenModelOperation(resourceSet);


		try {
		NullProgressMonitor np = new NullProgressMonitor();

		tgmfgen.loadMappingModel(gmfmap.getURI(),np);
		tgmfgen.loadGenModel(genmodel.getURI(), np);

		GenModel genmmodel = tgmfgen.findGenmodel();

		IFile target = (IFile)new File("product.gmfgen");
		tgmfgen.setGenURI(URI.createPlatformResourceURI(target.getFu llPath().toString(),
		true));


		} catch (CoreException e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
		}

		//IProgressMonitor monitor =
		//
		(IProgressMonitor)getProject().getReferences().get(AntCorePl ugin.ECLIPSE_PROGRESS_MONITOR);

		NullProgressMonitor np = new NullProgressMonitor();
		System.out.println("created IProgressMOnitor: ");
		tgmfgen.setGenURI(URI.createPlatformResourceURI("/bt.com.ccm.generation.plugin/model/product.gmfgen ",
		true));
		tgmfgen.executeTransformation(np);
	}*/
}
